<template>
    <div class="home">
        <img alt="Vue logo" src="../assets/logo.png">
        <HelloWorld msg="Welcome to Your Vue.js App"/>
    </div>
</template>

<script>
    // @ is an alias to /src
    import HelloWorld from '@/components/HelloWorld.vue'

    export default {
        name: 'home',
        components: {
            HelloWorld
        },
        methods: {
            async getData () {
                let params = { type: 'get', url: 'v1/school1', data: { a: 11 } }
                try {
                    let res = await this.$http(params)
                    console.log(res)
                } catch (e) {
                    console.log(e)
                }
            }
        },
        mounted () {
            this.getData()
        }
    }
</script>
